package com.vin.mapper;

import com.vin.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;


@Mapper
public interface UserMapper {
    @Select("select * from user where  username = #{username}")
        //根据用户名添加用户
    User findIdByUserName(String username) ;
    //添加
    @Insert("insert into user(username,password, create_time, update_time)"
            +" value(#{username}, #{password} ,now(),now())")
    void add(String username, String password) ;
}
